home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / bchelp10.zip / TI812.ASC < prev    next >
Text File  |  1991-09-17  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Turbo C++, Borland C++                 NUMBER  :  812
  9.   VERSION  :  All
  10.        OS  :  DOS
  11.      DATE  :  September 17, 1991                       PAGE  :  1/1
  12.  
  13.     TITLE  :  What Causes "Abnormal Program Termination"
  14.  
  15.  
  16.  
  17.  
  18.   The startup code does several things before going to the main()
  19.   function.  If any one of these fails, it will abort and display
  20.   the "Abnormal Program Termination" message; this message is
  21.   printed whenever the function abort() is invoked.
  22.  
  23.   The startup code will abort if:
  24.  
  25.       (1) There is not enough memory to load the program.
  26.  
  27.           Workaround: Free up memory begore running program.
  28.                       clean out system, run from DOS, not
  29.                       environment.
  30.  
  31.       (2) There is not enough memory to expand the stack.
  32.  
  33.           Workaround: As above, reduce the stack size.
  34.  
  35.       (3) If environment space is bad, TC checks the environment,
  36.           user has probable overwrote lower memory prior to trying
  37.           to load program.
  38.  
  39.       (4) If EMU cannot initilize. The EMU needs to take some space
  40.           of the stack, if the stack isn't big enough, program will
  41.           abort.
  42.  
  43.       (5) If overlay system cannot initilize. Usually memory
  44.           problem.
  45.  
  46.       (6) If there is not enough heapspace.
  47.  
  48.   Notice that in most cases, the problem is a lack of memory.
  49.  
  50.   One possible solution may arise if the person is working from the
  51.   Turbo C++ Programmers Platform.  The PP takes all of the memory
  52.   in the system when in runs.  When you want to run one of your
  53.   programs from inside the PP, memory is freed to the total of the
  54.   size of the load image of your program + 64K by default.  This
  55.   amount can be changed through Options|Debugger|Program Heap Size.
  56.   Try setting this value to a higher value and attempt to run the
  57.   program again.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.